:root {
    --bg1: #024537;
    --bg2: #013128;
    --bg3: #011f19;
    --card: #012a22;
    --accent: #0e6b57;
    --accent2: #0a4d3d;
    --primary: #EAF6F5;
    --muted: #9EB8B6;
    --text-dark: #0A2F2C;
    --text-light: #F4FBFA;
    --gold: #d9c994;
    --gold-2: #eee1b8;
    --on-gold: #0b241d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--text-light);
    line-height: 1.6;
}

[dir="rtl"] body {
    font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3));
    background-size: 400% 400%;
    animation: moveBackground 15s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 0;
    padding-top: 70px;
}

@keyframes moveBackground {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.panel {
    width: min(95vw, 1200px);
    border: 1px solid rgba(217,201,148,0.22);
    border-radius: 20px;
    padding: 28px 24px;
    background: linear-gradient(160deg, rgba(2,69,55,0.55), rgba(1,31,25,0.72));
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
    box-shadow: 0 24px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
    text-align: center;
    color: var(--text-light);
    transition: all 0.3s ease;
    margin-top: 20px;
}

.panel:hover {
    transform: translateY(-3px);
}

.panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
    color: var(--accent);
}

form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.field {
    margin-bottom: 0;
    text-align: left;
}

.actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.field label {
    display: block;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.field select,
.field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    background: #F4FBFA;
    color: #0A2F2C;
    outline: none;
    border: 2px solid #A9C4C3;
    font-size: 15px;
    direction: ltr;
    text-align: left;
}

.actions button {
    flex-grow: 1;
    padding: 12px 0;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.actions button:nth-child(1) {
    background: var(--muted);
    color: var(--text-dark);
}

.actions button:nth-child(2) {
    background: #d5dcdc;
    color: var(--text-dark);
}

.actions button:nth-child(3) {
    background: var(--accent);
    color: var(--text-light);
}

.actions button:hover {
    opacity: 0.9;
}

#outputPanel {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--muted);
    text-align: left;
    overflow-x: auto;
}

.result-summary {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg3);
    color: var(--primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.result-summary h3 {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--gold);
    margin-bottom: 5px;
}

.result-summary strong {
    color: var(--muted);
    font-weight: 500;
}

.result-summary span {
    color: var(--primary);
    font-weight: 700;
    margin-right: 5px;
}

.result-summary .cost-highlight {
    color: #ffd700;
    font-size: 16px;
}

.travel-plan-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.travel-plan-table th,
.travel-plan-table td {
    border: 1px solid var(--muted);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.travel-plan-table th {
    background-color: var(--accent);
    color: var(--primary);
    font-weight: 700;
    position: sticky;
    top: 0;
}

.travel-plan-table td {
    background-color: var(--primary);
    color: var(--text-dark);
}

.travel-plan-table tr:nth-child(even) td {
    background-color: #EAF0EF;
}

.travel-plan-table tr:hover td {
    background-color: #d8e5e3;
}

.travel-plan-table td.meal-cell {
    align-items: flex-start;
    gap: 2px;
    padding-bottom: 10px;
    position: static;
}

.meal-cell .meal-name {
    font-weight: bold;
    color: var(--text-dark);
    display: inline;
    margin-right: 5px;
}

.meal-cell .time-slot {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    background: #c3e0df;
    padding: 2px 5px;
    border-radius: 4px;
    position: relative;
    display: inline-block;
}

.error-msg {
    color: #a00;
    background: #ffe3e3;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
}

.map-title {
    text-align: center;
    color: var(--accent);
    font-size: 20px;
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.map-title i {
    font-size: 24px;
    color: var(--accent);
}

.day-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.day-btn {
    padding: 8px 18px;
    border: 2px solid var(--accent);
    border-radius: 20px;
    background: transparent;
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-btn:hover {
    background: var(--accent);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14,107,87, 0.4);
}

.day-btn.active {
    background: var(--accent);
    color: var(--text-light);
    box-shadow: 0 4px 12px rgba(14,107,87, 0.4);
}

.map-timeline-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 15px;
    margin-bottom: 20px;
    min-height: 500px;
}

#map {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.timeline-container {
    background: var(--bg3);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    max-height: 500px;
    border: 2px solid var(--accent);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.timeline-title {
    text-align: center;
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timeline-title i {
    color: #ffd700;
}

.timeline-day-label {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 15px;
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 28px;
    bottom: -20px;
    width: 2px;
    background: var(--muted);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    z-index: 2;
}

.timeline-item.hotel::after {
    background: #6c5ce7;
}

.timeline-item.breakfast::after {
    background: #fdcb6e;
}

.timeline-item.lunch::after {
    background: #e17055;
}

.timeline-item.dinner::after {
    background: #d63031;
}

.timeline-item.attraction::after {
    background: #00b894;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    border-left: 3px solid var(--muted);
    transition: all 0.3s ease;
}

.timeline-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--primary);
}

.timeline-card.hotel {
    border-left-color: #6c5ce7;
}

.timeline-card.breakfast {
    border-left-color: #fdcb6e;
}

.timeline-card.lunch {
    border-left-color: #e17055;
}

.timeline-card.dinner {
    border-left-color: #d63031;
}

.timeline-card.attraction {
    border-left-color: #00b894;
}

.timeline-card .tl-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 3px;
}

.timeline-card .tl-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-card .tl-time {
    font-size: 11px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-card .tl-time i {
    font-size: 10px;
}

.timeline-item.active .timeline-card {
    background: rgba(255, 255, 255, 0.2);
    border-left-width: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.custom-map-marker {
    background: transparent !important;
    border: none !important;
}

.route-arrow-icon {
    background: transparent !important;
    border: none !important;
}

@media (max-width: 900px) {
    .map-timeline-wrapper {
        grid-template-columns: 1fr;
    }
    #map {
        height: 350px;
    }
    .timeline-container {
        max-height: 300px;
    }
}

/* ============================================================
   Wizard — Panel Hero
   ============================================================ */

.panel-hero {
    text-align: center;
    padding: 10px 0 24px;
}

.panel-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    margin: 0 0 6px;
}

.panel-sub {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

/* ============================================================
   Wizard Progress Bar
   ============================================================ */

.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.wp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wp-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(6px);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.14);
}

.wp-step.active .wp-dot {
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    color: var(--text-dark);
    border-color: var(--gold);
    animation: wpPulse 1.8s ease-in-out infinite;
}

.wp-step.done .wp-dot {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(14,107,87,0.55);
}

@keyframes wpPulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(217,201,148,0.18), 0 0 16px rgba(217,201,148,0.45); }
    50%      { box-shadow: 0 0 0 8px rgba(217,201,148,0.10), 0 0 24px rgba(217,201,148,0.65); }
}

.wp-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.wp-step.active .wp-label { color: var(--accent); }
.wp-step.done  .wp-label  { color: #00b894; }

.wp-line {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.14);
    max-width: 80px;
    margin-bottom: 22px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.wp-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.wp-line.done::after { transform: scaleX(1); }

/* ============================================================
   Wizard Steps
   ============================================================ */

.wiz-step {
    display: none;
}

.wiz-step.active {
    display: block;
    animation: wizFadeIn 0.3s ease;
}

.wiz-step.active.slide-next { animation: wizSlideInRight 0.4s cubic-bezier(.22,1,.36,1); }
.wiz-step.active.slide-prev { animation: wizSlideInLeft  0.4s cubic-bezier(.22,1,.36,1); }

@keyframes wizFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes wizSlideInRight {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes wizSlideInLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}

.step-heading {
    text-align: center;
    margin-bottom: 24px;
}

.step-heading h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-light);
    margin: 0 0 6px;
}

.step-heading p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

/* ============================================================
   Option Cards Grid
   ============================================================ */

.opt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.opt-grid-3    { grid-template-columns: repeat(3, 1fr); }
.opt-grid-4    { grid-template-columns: repeat(4, 1fr); }
.opt-grid-5    { grid-template-columns: repeat(5, 1fr); }
.opt-grid-city { grid-template-columns: repeat(6, 1fr); }

.opt-card {
    background: rgba(255,255,255,0.055);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;
    padding: 18px 10px 14px;
    min-height: 44px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    user-select: none;
}

.opt-card:hover {
    border-color: rgba(217,201,148,0.55);
    background: rgba(255,255,255,0.09);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 14px 30px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(217,201,148,0.12);
}

.opt-card.selected {
    background: linear-gradient(150deg, rgba(217,201,148,0.28), rgba(14,107,87,0.6));
    border-color: var(--gold);
    color: #fff !important;
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(217,201,148,0.22), inset 0 0 0 1px rgba(217,201,148,0.4);
}

.opt-emoji {
    font-size: 30px;
    line-height: 1;
}

.opt-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    transition: color 0.2s;
}

.opt-card.selected .opt-label { color: #fff; }

.opt-desc {
    font-size: 11px;
    color: var(--muted);
    transition: color 0.2s;
}

.opt-card.selected .opt-desc { color: rgba(255,255,255,0.85); }

.opt-check {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    color: rgba(255,255,255,0.22);
    transition: color 0.2s;
}

.opt-card.selected .opt-check { color: var(--gold-2); }

.city-card { padding: 14px 8px 10px; }
.city-card .opt-emoji { font-size: 24px; }
.city-card .opt-label { font-size: 12px; }

/* ============================================================
   City Picker Map (Step 4 — interactive destination map)
   ============================================================ */

.city-picker-wrap {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(10px);
}

.city-picker-map {
    width: 100%;
    height: 320px;
    background: #0a1f1a;
}

.city-picker-map .leaflet-control-zoom {
    border: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.city-picker-map .leaflet-control-zoom a {
    background: rgba(1,42,34,0.85);
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.14);
}

/* Custom divIcon markers */
.city-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.city-pin-dot {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(2,69,55,0.9), rgba(1,31,25,0.95));
    border: 2px solid rgba(217,201,148,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.city-pin-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--gold);
    opacity: 0;
    transform: scale(1);
}

.city-pin-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    background: rgba(1,31,25,0.75);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

.city-pin:hover .city-pin-dot {
    transform: scale(1.12);
    border-color: var(--gold);
    box-shadow: 0 8px 22px rgba(217,201,148,0.35);
}

.city-pin-selected .city-pin-dot {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    box-shadow: 0 8px 24px rgba(217,201,148,0.5);
}

.city-pin-selected .city-pin-label {
    background: var(--gold);
    color: var(--text-dark);
    border-color: var(--gold);
}

.city-pin-selected .city-pin-pulse {
    animation: cityPinPulse 1.6s ease-out infinite;
}

@keyframes cityPinPulse {
    0%   { opacity: 0.55; transform: scale(1); }
    100% { opacity: 0;    transform: scale(1.9); }
}

.city-pin-disabled { cursor: not-allowed; opacity: 0.45; filter: grayscale(0.6); }
.city-pin-disabled:hover .city-pin-dot { transform: none; box-shadow: 0 6px 16px rgba(0,0,0,0.45); border-color: rgba(217,201,148,0.55); }

.city-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    justify-content: center;
}

.city-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.city-chip:hover:not(:disabled) {
    border-color: rgba(217,201,148,0.5);
    background: rgba(255,255,255,0.09);
    transform: translateY(-2px);
}

.city-chip.selected {
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    color: var(--text-dark);
    border-color: var(--gold);
    box-shadow: 0 6px 16px rgba(217,201,148,0.35);
}

.city-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* ============================================================
   Sub-preference blocks — optional add-ons within a wizard step
   (cuisine, age group, pace)
   ============================================================ */

.sub-pref-block {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.chip-select-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.pref-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
    color: var(--text-light);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pref-chip:hover {
    border-color: rgba(217,201,148,0.5);
    background: rgba(255,255,255,0.09);
    transform: translateY(-2px);
}

.pref-chip.selected {
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    color: var(--text-dark);
    border-color: var(--gold);
    box-shadow: 0 6px 16px rgba(217,201,148,0.35);
}

@media (max-width: 700px) {
    .city-picker-map { height: 260px; }
}

@media (max-width: 420px) {
    .city-picker-map { height: 220px; }
    .city-chip, .pref-chip { font-size: 11px; padding: 7px 11px; }
}

.opt-disabled {
    cursor: not-allowed;
    opacity: 0.52;
    filter: grayscale(0.4);
    pointer-events: none;
}

.opt-disabled:hover {
    transform: none;
    border-color: rgba(14,107,87,0.15);
    box-shadow: none;
}

.opt-soon {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #e8a020, #c9922a);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
    pointer-events: none;
}

/* ============================================================
   Option Row List — professional list layout
   (Purpose / Includes / Group Size steps)
   ============================================================ */

.opt-row-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.opt-row {
    /* Every .opt-row element also carries .opt-card, which sets
       flex-direction:column for the grid-style option cards — without this
       explicit reset, rows silently inherit that and stack icon/text/toggle
       vertically into a tall, awkward block instead of a compact horizontal row. */
    flex-direction: row;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    text-align: start;
    animation: optRowIn 0.4s ease backwards;
}

.opt-row-list .opt-row:nth-child(1)  { animation-delay: 0.02s; }
.opt-row-list .opt-row:nth-child(2)  { animation-delay: 0.06s; }
.opt-row-list .opt-row:nth-child(3)  { animation-delay: 0.10s; }
.opt-row-list .opt-row:nth-child(4)  { animation-delay: 0.14s; }
.opt-row-list .opt-row:nth-child(5)  { animation-delay: 0.18s; }
.opt-row-list .opt-row:nth-child(6)  { animation-delay: 0.22s; }
.opt-row-list .opt-row:nth-child(7)  { animation-delay: 0.26s; }
.opt-row-list .opt-row:nth-child(8)  { animation-delay: 0.30s; }
.opt-row-list .opt-row:nth-child(9)  { animation-delay: 0.34s; }
.opt-row-list .opt-row:nth-child(10) { animation-delay: 0.38s; }

@keyframes optRowIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.opt-row:hover {
    transform: translateX(4px);
}

.opt-row.selected {
    transform: translateX(4px);
}

.opt-row-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: linear-gradient(150deg, rgba(255,255,255,0.13), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.14);
    color: var(--text-light);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.opt-row:hover .opt-row-icon,
.opt-row.selected .opt-row-icon {
    transform: scale(1.08);
    border-color: rgba(217,201,148,0.5);
}

/* ── Category icon colors — shared by option rows & mode cards ── */
.ic-orange  { background: linear-gradient(150deg, rgba(232,131,74,0.24),  rgba(232,131,74,0.05));  border-color: rgba(232,131,74,0.5);  color: #f2a878; }
.ic-purple  { background: linear-gradient(150deg, rgba(155,107,209,0.24), rgba(155,107,209,0.05)); border-color: rgba(155,107,209,0.5); color: #cdadf0; }
.ic-teal    { background: linear-gradient(150deg, rgba(47,182,165,0.24),  rgba(47,182,165,0.05));  border-color: rgba(47,182,165,0.5);  color: #7bdbca; }
.ic-pink    { background: linear-gradient(150deg, rgba(224,103,143,0.24), rgba(224,103,143,0.05)); border-color: rgba(224,103,143,0.5); color: #f4a0bb; }
.ic-blue    { background: linear-gradient(150deg, rgba(74,144,217,0.24),  rgba(74,144,217,0.05));  border-color: rgba(74,144,217,0.5);  color: #9bc8f5; }
.ic-green   { background: linear-gradient(150deg, rgba(63,174,107,0.24),  rgba(63,174,107,0.05));  border-color: rgba(63,174,107,0.5);  color: #8bdba8; }
.ic-emerald { background: linear-gradient(150deg, rgba(37,166,140,0.24),  rgba(37,166,140,0.05));  border-color: rgba(37,166,140,0.5);  color: #7cd9c2; }
.ic-red     { background: linear-gradient(150deg, rgba(217,83,79,0.24),   rgba(217,83,79,0.05));   border-color: rgba(217,83,79,0.5);   color: #f4a09d; }
.ic-amber   { background: linear-gradient(150deg, rgba(217,164,65,0.24),  rgba(217,164,65,0.05));  border-color: rgba(217,164,65,0.5);  color: #f4cd8f; }
.ic-cyan    { background: linear-gradient(150deg, rgba(58,166,199,0.24),  rgba(58,166,199,0.05));  border-color: rgba(58,166,199,0.5);  color: #97ddf4; }
.ic-gold    { background: linear-gradient(150deg, rgba(217,201,148,0.28), rgba(217,201,148,0.06)); border-color: rgba(217,201,148,0.55); color: var(--gold-2); }

.opt-row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    text-align: start;
}

.opt-row-text .opt-label {
    font-size: 14.5px;
    text-align: start;
}

.opt-row-text .opt-desc {
    font-size: 12px;
    text-align: start;
}

/* Single-select radio indicator */
.opt-row-radio {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.opt-row.selected .opt-row-radio {
    border-color: var(--gold);
    background: var(--gold);
}

.opt-row.selected .opt-row-radio::after {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-dark);
}

/* Multi-select toggle switch */
.opt-row-toggle {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.16);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.opt-row-toggle-knob {
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.25s ease;
}

.opt-row.selected .opt-row-toggle {
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-color: var(--gold);
}

.opt-row.selected .opt-row-toggle-knob {
    transform: translateX(20px);
}

[dir="rtl"] .opt-row.selected .opt-row-toggle-knob {
    transform: translateX(-20px);
}

@media (max-width: 480px) {
    .opt-row { padding: 12px 14px; gap: 12px; }
    .opt-row-icon { width: 42px; height: 42px; font-size: 20px; border-radius: 12px; }
    .opt-row-text .opt-label { font-size: 13.5px; }
    .opt-row-text .opt-desc { font-size: 11px; }
}

/* ============================================================
   Step 4 — Detail Fields
   ============================================================ */

.detail-section {
    margin-bottom: 20px;
}

.detail-section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.detail-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-field input {
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    color-scheme: dark;
}

.detail-field input::placeholder { color: rgba(244,251,250,0.4); }

.detail-field input:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(217,201,148,0.18);
}

.wiz-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    justify-content: center;
}

.wiz-summary span {
    background: rgba(217,201,148,0.12);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================================
   Wizard Navigation
   ============================================================ */

.wiz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    gap: 12px;
}

.wiz-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 2px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wiz-back-btn:hover {
    border-color: var(--gold);
    background: rgba(255,255,255,0.05);
}

.wiz-back-btn:active { transform: scale(0.97); }

.wiz-next-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 100%);
    color: var(--on-gold);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(217,201,148,0.28);
}

.wiz-next-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 28px rgba(217,201,148,0.45);
}

.wiz-next-btn:active { transform: translateY(0) scale(0.98); }

.wiz-error {
    background: rgba(255,107,107,0.1);
    border: 1px solid rgba(255,107,107,0.35);
    color: #ff6b6b;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   New Trip Button (in results)
   ============================================================ */

.new-trip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 20px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.new-trip-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* ============================================================
   Responsive Wizard
   ============================================================ */

@media (max-width: 700px) {
    .opt-grid-5    { grid-template-columns: repeat(3, 1fr); }
    .opt-grid-city { grid-template-columns: repeat(3, 1fr); }
    .opt-grid-3,
    .opt-grid-4    { grid-template-columns: repeat(2, 1fr); }
    .detail-fields-row { grid-template-columns: 1fr; }
    .wp-label { display: none; }
    .wp-line  { max-width: 40px; }
}

@media (max-width: 420px) {
    .panel { padding: 20px 14px; border-radius: 16px; }
    .panel-title { font-size: 21px; }
    .opt-grid-5,
    .opt-grid-city { grid-template-columns: repeat(2, 1fr); }
    .opt-card { padding: 14px 8px 10px; }
    .opt-emoji { font-size: 24px; }
    .wp-dot { width: 36px; height: 36px; font-size: 14px; }
    .wp-line { max-width: 22px; }
    .wiz-nav { flex-direction: column-reverse; }
    .wiz-back-btn, .wiz-next-btn { width: 100%; justify-content: center; }
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    font-family: "Segoe UI", sans-serif;
}

.leaflet-popup-content {
    margin: 12px;
}

.leaflet-popup-close-button {
    font-size: 16px;
    color: #666;
}

@media (max-width: 600px) {
    .day-tab    { padding: 8px 12px; font-size: 11px; }
    .planner-map { height: 240px; }
}

/* ============================================================
   Day Cards — Travel Plan
   ============================================================ */

.days-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.day-card {
    background: var(--primary);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.13);
    border: 1px solid rgba(14,107,87,0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

.day-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--accent);
    padding: 14px 20px;
    color: var(--text-light);
    flex-wrap: wrap;
    gap: 8px;
}

.day-card-num {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-card-city {
    font-size: 14px;
    opacity: 0.88;
    display: flex;
    align-items: center;
    gap: 5px;
}

.day-card-total {
    font-size: 15px;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.day-card-body {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    gap: 14px;
    border-bottom: 1px solid rgba(14,107,87,0.10);
    transition: background 0.2s;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row:hover {
    background: rgba(14,107,87,0.05);
}

.detail-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 2px;
}

.detail-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    color: #555;
    flex-wrap: wrap;
}

.star-icon {
    color: #f4b942;
    font-size: 11px;
}

.stars-wrap {
    display: inline-flex;
    gap: 1px;
    align-items: center;
}

.rating-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    margin-left: 3px;
}

.detail-price-col {
    text-align: right;
    flex-shrink: 0;
}

.detail-price-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
}

.detail-price-val .sar {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.75;
}

.price-free {
    font-size: 14px;
    font-weight: 700;
    color: #00b894;
}

.price-na {
    font-size: 14px;
    color: #aaa;
}

.price-label {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

/* ============================================================
   Timeline — Redesigned
   ============================================================ */

.tl-day-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 215, 0, 0.12);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 700;
    color: #ffd700;
    border: 1px solid rgba(255,215,0,0.25);
}

.tl-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 0;
    cursor: pointer;
}

.tl-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 28px;
    flex-shrink: 0;
    padding-top: 6px;
}

.tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.6);
    z-index: 2;
    transition: transform 0.2s;
}

.tl-item:hover .tl-dot {
    transform: scale(1.3);
}

.tl-line {
    width: 2px;
    flex: 1;
    min-height: 20px;
    background: linear-gradient(to bottom, rgba(158,184,182,0.5), rgba(158,184,182,0.1));
    margin: 4px 0;
}

.tl-card {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    margin-left: 8px;
    border-left: 3px solid rgba(255,255,255,0.2);
    transition: all 0.25s ease;
}

.tl-card.hotel      { border-left-color: #6c5ce7; }
.tl-card.breakfast  { border-left-color: #fdcb6e; }
.tl-card.lunch      { border-left-color: #e17055; }
.tl-card.dinner     { border-left-color: #d63031; }
.tl-card.attraction { border-left-color: #00b894; }

.tl-item:hover .tl-card {
    background: rgba(255,255,255,0.14);
    transform: translateX(4px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.tl-item.active .tl-card {
    background: rgba(255,255,255,0.18);
    border-left-width: 4px;
}

.tl-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.tl-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tl-stop-num {
    font-size: 9px;
    color: var(--muted);
    font-weight: 600;
}

.tl-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    line-height: 1.3;
}

.tl-card-time {
    font-size: 11px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.tl-card-hint {
    font-size: 10px;
    color: rgba(158,184,182,0.7);
    display: flex;
    align-items: center;
    gap: 4px;
    font-style: italic;
}

.tl-travel-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: rgba(158,184,182,0.5);
    padding: 2px 0 2px 36px;
    margin-bottom: 4px;
    font-style: italic;
}

.tl-end {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 0 6px;
    margin-top: 6px;
}

.tl-end-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffd700;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(255,215,0,0.2);
}

.tl-end-label {
    font-size: 13px;
    font-weight: 700;
    color: #ffd700;
}

/* ============================================================
   Budget status colors
   ============================================================ */

.budget-ok   { color: #00b894; font-weight: 800; }
.budget-over { color: #d63031; font-weight: 800; }
.cost-yellow { color: #f4b942; font-weight: 800; }
.cost-badge  { background: var(--accent); color: #fff; padding: 3px 9px; border-radius: 12px; font-size: 13px; font-weight: 700; }

/* ============================================================
   Budget Bar
   ============================================================ */

.budget-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--bg3);
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 24px;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.bb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 150px;
    padding: 8px 14px;
    border-right: 1px solid rgba(158,184,182,0.2);
}

.bb-item:last-child {
    border-right: none;
}

.bb-item > i {
    font-size: 22px;
    color: var(--muted);
    flex-shrink: 0;
}

.bb-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 3px;
}

.bb-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-light);
    line-height: 1.2;
}

.bb-status-tag {
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    opacity: 0.8;
}

/* ============================================================
   Day Tabs
   ============================================================ */

.day-tabs {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
    padding: 0 2px;
}

.day-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid rgba(255,255,255,0.16);
    border-radius: 30px;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.day-tab:hover {
    border-color: var(--gold);
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
}

.day-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-light);
    box-shadow: 0 4px 14px rgba(14,107,87,0.4);
}

.day-tab:nth-child(1).active { background:#007AFF; border-color:#007AFF; box-shadow:0 4px 14px rgba(0,122,255,0.4); }
.day-tab:nth-child(2).active { background:#FF9500; border-color:#FF9500; box-shadow:0 4px 14px rgba(255,149,0,0.4); }
.day-tab:nth-child(3).active { background:#FF3B30; border-color:#FF3B30; box-shadow:0 4px 14px rgba(255,59,48,0.4); }
.day-tab:nth-child(4).active { background:#34C759; border-color:#34C759; box-shadow:0 4px 14px rgba(52,199,89,0.4); }
.day-tab:nth-child(5).active { background:#AF52DE; border-color:#AF52DE; box-shadow:0 4px 14px rgba(175,82,222,0.4); }
.day-tab:nth-child(6).active { background:#5AC8FA; border-color:#5AC8FA; box-shadow:0 4px 14px rgba(90,200,250,0.4); }

.dt-dist {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 2px;
}

.dt-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.day-tab:not(.active) .dt-circle {
    background: var(--accent);
    color: #fff;
}

.dt-label {
    font-size: 13px;
}

/* ============================================================
   Planner Split Layout
   ============================================================ */

.planner-layout {
    display: grid;
    grid-template-columns: 1fr 460px;
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

.planner-left {
    display: flex;
    flex-direction: column;
}

.planner-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 80px;
}

.planner-map {
    width: 100%;
    height: 520px;
    border-radius: 14px;
    border: 2px solid var(--accent);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 1;
}

.planner-timeline {
    background: var(--bg3);
    border-radius: 14px;
    padding: 14px;
    border: 2px solid rgba(14,107,87,0.3);
    max-height: 420px;
    overflow-y: auto;
}

.tl-header-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(158,184,182,0.2);
}

/* ============================================================
   Day Card — detail rows upgrade
   ============================================================ */

.day-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
    border: 1px solid rgba(14,107,87,0.15);
    background: #fff;
}

.day-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--day-clr, var(--accent));
    padding: 14px 18px;
    color: #fff;
    gap: 8px;
    transition: background 0.4s;
}

.dch-left        { display: flex; flex-direction: column; gap: 3px; }
.dch-badge       { font-size: 16px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 7px; }
.dch-city        { font-size: 12px; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 4px; }
.dch-cost        { text-align: right; }
.dch-cost-label  { font-size: 9px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.6px; }
.dch-cost-val    { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.1; }
.dch-cost-val span { font-size: 11px; font-weight: 500; opacity: 0.7; }

.detail-desc {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
    line-height: 1.5;
    font-style: italic;
    border-left: 2px solid #ddd;
    padding-left: 8px;
}

.gmaps-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    padding: 4px 11px;
    background: #1a73e8;
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.gmaps-link:hover {
    background: #1557b0;
}

.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 7px;
}

.booking-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    background: #003580;
    color: #fff;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.booking-link:hover {
    background: #00224f;
}

.dr-tag {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    background: rgba(14,107,87,0.08);
    padding: 2px 7px;
    border-radius: 8px;
    vertical-align: middle;
}

/* ============================================================
   Day Card Footer — cost breakdown
   ============================================================ */

.day-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: #f8fafa;
    border-top: 1px solid rgba(14,107,87,0.1);
    font-size: 12px;
}

.dcf-label {
    font-weight: 700;
    color: var(--accent);
    margin-right: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dcf-chip {
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

.hotel-chip  { background: rgba(108,92,231,0.1); color: #6c5ce7; }

/* ============================================================
   VERTICAL TIMELINE — day activity entries
   ============================================================ */

.tl-entries {
    display: flex;
    flex-direction: column;
    padding: 6px 0 0;
}

.tl-entry {
    display: grid;
    grid-template-columns: 62px 38px 1fr;
    position: relative;
}

.tl-time-col {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 15px 8px 0 4px;
}

.tl-time-pill {
    font-size: 9.5px;
    font-weight: 800;
    color: var(--ec, #0e6b57);
    background: rgba(0,0,0,0.04);
    padding: 3px 6px;
    border-radius: 20px;
    white-space: nowrap;
    text-align: center;
    line-height: 1.4;
    border: 1px solid rgba(0,0,0,0.06);
}

.tl-conn {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tl-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ec, #0e6b57);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.22);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1;
}

.tl-entry:hover .tl-dot {
    transform: scale(1.18);
    box-shadow: 0 5px 16px rgba(0,0,0,0.28);
}

.tl-line {
    flex: 1;
    width: 2px;
    min-height: 14px;
    background: linear-gradient(to bottom, var(--ec, #0e6b57) 0%, rgba(180,180,180,0.18) 100%);
    opacity: 0.28;
    margin: 3px 0 0;
    border-radius: 2px;
}

.tl-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ec, #0e6b57);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px 3px 8px;
    border-radius: 20px;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.tl-card {
    background: rgba(255,255,255,0.78);
    border-radius: 11px;
    margin: 8px 10px 8px 7px;
    padding: 9px 11px;
    border-left: 3px solid var(--ec, #0e6b57);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.18s, box-shadow 0.18s;
    backdrop-filter: blur(4px);
}

.tl-card:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 18px rgba(0,0,0,0.12);
}

.tl-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.tl-card-title { flex: 1; min-width: 0; }

.tl-type {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--ec, #0e6b57);
}

.tl-badge {
    font-size: 9px;
    font-weight: 600;
    color: #999;
    background: rgba(0,0,0,0.05);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 5px;
    text-transform: none;
    letter-spacing: 0;
}

.tl-name-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: 3px 0 2px;
}

.tl-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tl-menu-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    background: var(--ec, #0e6b57);
    color: #fff;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.18s, transform 0.18s;
    box-shadow: 0 1px 5px rgba(0,0,0,0.18);
}

.tl-menu-badge:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.tl-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
}

.tl-price {
    text-align: right;
    flex-shrink: 0;
    padding-left: 6px;
}

.tl-price-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    display: block;
}

.tl-price-cur {
    font-size: 9px;
    color: #bbb;
    font-weight: 600;
}

.tl-price-sub {
    font-size: 9px;
    color: #ccc;
    margin-top: 1px;
    white-space: nowrap;
}

.tl-free {
    font-size: 11px;
    font-weight: 700;
    color: #00b894;
    background: rgba(0,184,148,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    border: 1px solid rgba(0,184,148,0.2);
}

.tl-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.5;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
}

.tl-actions {
    display: flex;
    gap: 5px;
    margin-top: 7px;
    flex-wrap: wrap;
}

.tl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 10.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.18s;
    border: 1.5px solid transparent;
}

.tl-nav  { background: rgba(26,115,232,0.09); color: #1a73e8; border-color: rgba(26,115,232,0.2); }
.tl-nav:hover  { background: #1a73e8; color: #fff; }
.tl-book { background: rgba(0,53,128,0.09); color: #003580; border-color: rgba(0,53,128,0.2); }
.tl-book:hover { background: #003580; color: #fff; }
.tl-menu { background: rgba(0,184,148,0.09); color: #00917a; border-color: rgba(0,184,148,0.22); }
.tl-menu:hover { background: #00b894; color: #fff; }

/* "More options" — deliberately the loudest button on the card */
.tl-swap {
    flex-basis: 100%;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    padding: 6px 12px;
    color: #6b4e00;
    background: linear-gradient(135deg, #f3d071, #e6b93e);
    border-color: #d8a72e;
    box-shadow: 0 2px 8px rgba(214,167,46,0.35);
}
.tl-swap:hover { filter: brightness(1.06); transform: translateY(-1px); }
.tl-swap:active { transform: translateY(0); }

.explorer-sidebar .tl-card {
    background: rgba(255,255,255,0.05);
    box-shadow: none;
    border-left-color: var(--ec);
}
.explorer-sidebar .tl-card:hover { background: rgba(255,255,255,0.09); transform: translateX(2px); }
.explorer-sidebar .tl-time-pill  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.55); border-color: rgba(255,255,255,0.08); }
.explorer-sidebar .tl-type       { color: var(--ec); }
.explorer-sidebar .tl-badge      { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); }
.explorer-sidebar .tl-name       { color: #fff; }
.explorer-sidebar .tl-menu-badge { background: var(--ec); box-shadow: 0 1px 6px rgba(0,0,0,0.4); }
.explorer-sidebar .tl-desc       { color: rgba(255,255,255,0.42); }
.explorer-sidebar .tl-price-num  { color: #fff; }
.explorer-sidebar .tl-price-cur  { color: rgba(255,255,255,0.35); }
.explorer-sidebar .tl-price-sub  { color: rgba(255,255,255,0.28); }
.explorer-sidebar .tl-free       { color: #34C759; background: rgba(52,199,89,0.12); border-color: rgba(52,199,89,0.2); }
.explorer-sidebar .tl-line       { opacity: 0.14; }
.explorer-sidebar .tl-dot        { box-shadow: 0 2px 8px rgba(0,0,0,0.45); }
.explorer-sidebar .dch-badge     { color: #fff; }
.explorer-sidebar .dch-city      { color: rgba(255,255,255,0.7); }
.explorer-sidebar .dch-cost-val  { color: #fff; }
.explorer-sidebar .dch-cost-label{ color: rgba(255,255,255,0.5); }
.explorer-sidebar .tl-nav  { background: rgba(0,122,255,0.16); color: #5ac8fa; border-color: rgba(0,122,255,0.28); }
.explorer-sidebar .tl-nav:hover  { background: rgba(0,122,255,0.32); color: #fff; }
.explorer-sidebar .tl-book { background: rgba(0,75,160,0.22); color: #90c8ff; border-color: rgba(0,75,160,0.32); }
.explorer-sidebar .tl-book:hover { background: rgba(0,75,160,0.42); color: #fff; }
.explorer-sidebar .tl-menu { background: rgba(0,184,148,0.14); color: #2ecc71; border-color: rgba(0,184,148,0.28); }
.explorer-sidebar .tl-menu:hover { background: rgba(0,184,148,0.3); color: #fff; }
.explorer-sidebar .tl-swap {
    color: #1a1a2e;
    background: linear-gradient(135deg, #f5d784, #e6b93e);
    border-color: #e6b93e;
    box-shadow: 0 2px 10px rgba(230,185,62,0.4);
}

.explorer-sidebar .tl-type-chip {
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ============================================================
   "MORE OPTIONS" — translucent alternatives shown on the map
   ============================================================ */

.swap-banner {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100% - 28px);
    padding: 8px 10px 8px 16px;
    border-radius: 999px;
    background: rgba(11,46,51,0.92);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 6px 22px rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.14);
}
.swap-banner-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swap-banner-txt strong { color: #f5d784; }
.swap-banner-cancel {
    flex-shrink: 0;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s;
}
.swap-banner-cancel:hover { background: rgba(255,255,255,0.25); }

/* Leaflet divIcon wrapper carries no box of its own */
.leaflet-marker-icon.swap-cand-wrap { background: none; border: none; }

.swap-cand {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    min-width: 128px;
    max-width: 210px;
    border-radius: 12px;
    background: rgba(255,255,255,0.72);
    border: 1.5px dashed var(--sc, #0B2E33);
    box-shadow: 0 3px 12px rgba(11,46,51,0.28);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Arial, sans-serif;
}
.swap-cand.hot,
.swap-cand:hover {
    background: #fff;
    border-style: solid;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 8px 24px rgba(11,46,51,0.42);
    z-index: 5;
}
.swap-cand-emoji { font-size: 16px; line-height: 1; flex-shrink: 0; }
.swap-cand-body  { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.swap-cand-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #0B2E33;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.swap-cand-meta {
    display: flex;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #4a6b6a;
}
.swap-cand-pick {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    background: var(--sc, #0B2E33);
    padding: 3px 8px;
    border-radius: 999px;
}

/* ============================================================
   STICKY TRIP TIMELINE STRIP inside sidebar
   ============================================================ */

.sb-strip-wrap {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.sb-strip-wrap .trip-timeline-strip {
    background: rgba(255,255,255,0.04);
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.sb-strip-wrap .tt-header {
    padding: 8px 14px 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: transparent;
}
.sb-strip-wrap .tt-header i { color: rgba(255,255,255,0.4); }

.sb-strip-wrap .tt-track {
    padding: 10px 14px 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.sb-strip-wrap .tt-track::-webkit-scrollbar { display: none; }

.sb-strip-wrap .tt-rail {
    top: 26px;
    background: rgba(255,255,255,0.1);
}
.sb-strip-wrap .tt-fill {
    background: linear-gradient(to right, #00b894, #34C759);
}

.sb-strip-wrap .tt-nodes {
    gap: 4px;
    min-width: max-content;
}

.sb-strip-wrap .tt-node {
    min-width: 44px;
    cursor: pointer;
}

.sb-strip-wrap .tt-node-dot {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
}

.sb-strip-wrap .tt-node-label {
    color: rgba(255,255,255,0.5);
    font-size: 10px;
}

.sb-strip-wrap .tt-node.done .tt-node-dot {
    background: #00b894;
    border-color: #00b894;
}
.sb-strip-wrap .tt-node.done .tt-node-label { color: #00b894; }

.sb-strip-wrap .tt-node.active .tt-node-dot {
    background: var(--accent);
    border-color: #34C759;
    box-shadow: 0 0 0 4px rgba(52,199,89,0.2), 0 3px 12px rgba(0,184,148,0.5);
}
.sb-strip-wrap .tt-node.active .tt-node-label { color: #34C759; }

.sb-strip-wrap .tt-node-cost  { display: none; }
.sb-strip-wrap .tt-node-icons { display: none; }

.sb-strip-wrap .tt-day-num { color: rgba(255,255,255,0.9); }
.sb-strip-wrap .tt-node.done   .tt-day-num { color: #fff; }
.sb-strip-wrap .tt-node.active .tt-day-num { color: #fff; font-size: 14px; }

.explorer-sidebar .day-card-header {
    position: sticky;
    top: 0;
    z-index: 20;
}
.meal-chip   { background: rgba(225,112,85,0.1);  color: #e17055; }
.cafe-chip   { background: rgba(160,82,45,0.1);   color: #a0522d; }
.att-chip    { background: rgba(0,184,148,0.1);   color: #00b894; }

/* ============================================================
   Trip Timeline Strip — redesigned for clarity
   ============================================================ */

.trip-timeline-strip {
    background: #fff;
    border-radius: 16px;
    margin-top: 18px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 20px rgba(14,107,87,0.10);
    overflow: hidden;
}

.tt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 100%);
    color: #fff;
}

.tt-header-left {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 800;
}
.tt-header-left i { font-size: 16px; color: #a8e6cf; }

.tt-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tt-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    font-weight: 600;
    line-height: 1.3;
}
.tt-stat strong {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.tt-track {
    position: relative;
    padding: 28px 36px 24px;
}

.tt-rail {
    position: absolute;
    top: 46px;             /* vertically centered on the dot */
    left: 72px;
    right: 72px;
    height: 6px;
    background: #e8f2f1;
    border-radius: 3px;
    overflow: hidden;
}

.tt-fill {
    height: 100%;
    background: linear-gradient(to right, #00b894, var(--accent));
    border-radius: 3px;
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.tt-nodes {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.tt-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    padding: 0 4px;
    transition: transform 0.2s ease;
}

.tt-node:hover { transform: translateY(-3px); }

.tt-node-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f0f5f5;
    border: 3px solid #d4e9e7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.tt-node.done .tt-node-dot {
    background: #00b894;
    border-color: #00b894;
    box-shadow: 0 3px 10px rgba(0,184,148,0.3);
}

.tt-node.active .tt-node-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 5px rgba(14,107,87,0.18), 0 4px 16px rgba(14,107,87,0.45);
    transform: scale(1.15);
}

@keyframes ttPulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(14,107,87,0.18), 0 4px 16px rgba(14,107,87,0.45); }
    50%       { box-shadow: 0 0 0 9px rgba(14,107,87,0.09), 0 4px 16px rgba(14,107,87,0.45); }
}
.tt-node.active .tt-node-dot { animation: ttPulse 2s ease-in-out infinite; }

.tt-day-num {
    font-size: 15px;
    font-weight: 800;
    color: #9EB8B6;
    line-height: 1;
    transition: color 0.2s;
}

.tt-node.done   .tt-day-num { color: #fff; }
.tt-node.active .tt-day-num { color: #fff; font-size: 16px; }

.tt-now-badge {
    display: none;
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}
.tt-node.active .tt-now-badge { display: block; }

.tt-node-label {
    font-size: 12px;
    font-weight: 700;
    color: #9EB8B6;
    text-align: center;
    white-space: nowrap;
    margin-top: 14px;          /* space for NOW badge */
    transition: color 0.2s;
}
.tt-node.active .tt-node-label { color: var(--accent); }
.tt-node.done   .tt-node-label { color: #00b894; }

.tt-node-icons {
    font-size: 13px;
    letter-spacing: -1px;
    opacity: 0.55;
    line-height: 1;
}
.tt-node.active .tt-node-icons { opacity: 1; }
.tt-node.done   .tt-node-icons { opacity: 0.85; }

.tt-node-cost {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(14,107,87,0.08);
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid rgba(14,107,87,0.15);
}
.tt-node.active .tt-node-cost {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.tt-node.done .tt-node-cost {
    color: #00b894;
    background: rgba(0,184,148,0.08);
    border-color: rgba(0,184,148,0.2);
}

.tt-nodes.many-days .tt-node-cost  { display: none; }
.tt-nodes.many-days .tt-node-icons { display: none; }

@media (max-width: 700px) {
    .tt-node-cost        { display: none; }
    .tt-node-icons       { display: none; }
    .tt-track            { padding: 24px 12px 20px; }
    .tt-rail             { left: 32px; right: 32px; }
    .tt-node-dot         { width: 36px; height: 36px; }
    .tt-day-num          { font-size: 13px; }
    .tt-rail             { top: 40px; }
    .tt-header           { padding: 12px 16px; }
    .tt-header-right     { display: none; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 960px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }
    .planner-right {
        position: static;
    }
    .planner-map {
        height: 380px;
    }
    .bb-item {
        border-right: none;
        border-bottom: 1px solid rgba(158,184,182,0.15);
        min-width: 45%;
    }
}

@media (max-width: 600px) {
    .budget-bar { padding: 12px; }
    .bb-item    { min-width: 100%; }
    .day-tab    { padding: 8px 14px; font-size: 12px; }
    .planner-map { height: 240px; }
}

/* ============================================================
   EXPLORER MODE — Full-screen map + dark sidebar
   ============================================================ */

#explorerOverlay {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    overflow: hidden;
    background: var(--bg3);
}

.explorer-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.explorer-sidebar {
    width: 360px;
    min-width: 360px;
    height: 100%;
    background: var(--bg3);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.07);
    transition: width 0.28s ease, min-width 0.28s ease;
    overflow: hidden;
    z-index: 10;
    position: relative;
}

.explorer-sidebar.collapsed {
    width: 0;
    min-width: 0;
}

/* Peek-sheet drag handle + map scrim only exist for the mobile pattern */
.sidebar-drag-handle { display: none; }
.sheet-scrim { display: none; }

.sb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
    gap: 8px;
}

.sb-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-title i { color: #007AFF; }

.sb-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sb-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.sb-toggle:hover { background: rgba(255,255,255,0.2); }

.sb-new-trip {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.85);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}
.sb-new-trip:hover { background: rgba(255,255,255,0.16); color: #fff; }

.sb-save-trip {
    background: rgba(52,199,89,0.18);
    border: 1px solid rgba(52,199,89,0.4);
    color: #34c759;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}
.sb-save-trip:hover { background: rgba(52,199,89,0.32); }

.sb-budget {
    display: flex;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
    gap: 0;
}

.sb-chip {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
}
.sb-chip + .sb-chip { border-left: 1px solid rgba(255,255,255,0.07); }

.sb-chip-label {
    color: rgba(255,255,255,0.4);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 3px;
}

.sb-chip-val {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.sb-chip-val span { color: rgba(255,255,255,0.4); font-size: 10px; font-weight: 400; }
.sb-chip.ok   .sb-chip-val { color: #34C759; }
.sb-chip.over .sb-chip-val { color: #FF3B30; }

.sb-day-tabs {
    display: flex;
    gap: 5px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}
.sb-day-tabs::-webkit-scrollbar { display: none; }

.sb-day-tab {
    flex-shrink: 0;
    background: rgba(255,255,255,0.07);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 7px 14px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    transition: all 0.2s;
    min-width: 56px;
    font-family: inherit;
}
.sb-day-tab:hover {
    background: rgba(255,255,255,0.13);
    color: #fff;
}
.sb-day-tab.active {
    background: var(--day-color, #007AFF);
    border-color: var(--day-color, #007AFF);
    color: #fff;
    box-shadow: 0 2px 14px rgba(0,0,0,0.35);
}

.sdt-num  { font-size: 15px; font-weight: 800; line-height: 1; }
.sdt-dist { font-size: 9px;  opacity: 0.75;  line-height: 1; }
.sdt-label{ font-size: 10px; opacity: 0.8;   line-height: 1; display: none; }

.sb-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.sb-body::-webkit-scrollbar       { width: 4px; }
.sb-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.explorer-sidebar .day-card {
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}
.explorer-sidebar .day-card-header {
    background: var(--day-clr, rgba(255,255,255,0.06));
    border-bottom: 1px solid rgba(255,255,255,0.07);
    border-radius: 0;
    opacity: 0.95;
}
.explorer-sidebar .day-card-num,
.explorer-sidebar .day-card-city,
.explorer-sidebar .day-card-total { color: rgba(255,255,255,0.85); }

.explorer-sidebar .day-card-body  { padding: 0; }
.explorer-sidebar .detail-row {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: transparent;
    padding: 12px 14px;
}
.explorer-sidebar .detail-row:hover { background: rgba(255,255,255,0.04); }

.explorer-sidebar .detail-label  { color: rgba(255,255,255,0.5);  }
.explorer-sidebar .dr-tag        { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
.explorer-sidebar .detail-name   { color: #fff; }
.explorer-sidebar .detail-meta   { color: rgba(255,255,255,0.5); }
.explorer-sidebar .detail-desc   { color: rgba(255,255,255,0.45); }
.explorer-sidebar .detail-price-val { color: #fff; }
.explorer-sidebar .sar           { color: rgba(255,255,255,0.4); }
.explorer-sidebar .price-label   { color: rgba(255,255,255,0.35); }
.explorer-sidebar .price-free    { color: #34C759; }
.explorer-sidebar .price-na      { color: rgba(255,255,255,0.25); }
.explorer-sidebar .star-icon     { color: #FFD60A; }
.explorer-sidebar .rating-val    { color: rgba(255,255,255,0.6); }

.explorer-sidebar .day-card-footer {
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.07);
    border-radius: 0;
}
.explorer-sidebar .dcf-label      { color: rgba(255,255,255,0.4); }
.explorer-sidebar .dcf-chip       { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); }

.explorer-sidebar .gmaps-link {
    background: rgba(0,122,255,0.18);
    color: #5ac8fa;
    border-color: rgba(0,122,255,0.3);
}
.explorer-sidebar .gmaps-link:hover { background: rgba(0,122,255,0.3); }

.explorer-sidebar .booking-link {
    background: rgba(0,75,160,0.25);
    color: #90c8ff;
    border-color: rgba(0,75,160,0.35);
}
.explorer-sidebar .booking-link:hover { background: rgba(0,75,160,0.45); }

.explorer-map {
    flex: 1;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

#explorerOverlay #plannerMap {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#explorerOverlay #plannerMap .leaflet-container {
    width: 100%;
    height: 100%;
    background: #e8e0d8;
}

#explorerOverlay .leaflet-top,
#explorerOverlay .leaflet-bottom {
    z-index: 10;
}

.sb-reopen-btn {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: rgba(15,25,35,0.85);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    z-index: 20;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
    transition: background 0.2s;
}
.sb-reopen-btn:hover { background: rgba(255,255,255,0.2); }

/* In RTL, #explorerOverlay's flex row is mirrored so the sidebar renders on the
   right — the reopen button must pin to that same side, or collapsing the
   sidebar leaves it hidden on the opposite edge with no visible way back. */
html[dir="rtl"] .sb-reopen-btn {
    left: auto;
    right: 12px;
}
html[dir="rtl"] .explorer-sidebar {
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.07);
}

@media (max-width: 768px) {
    /* Persistent peek sheet — the pattern Google Maps/Uber/Airbnb use for
       exactly this problem. The map fills the ENTIRE screen underneath, so
       it's always fully visible and pannable. A slim summary strip (header +
       budget) sits permanently over its bottom edge — always visible too, so
       the user never has to guess an itinerary exists — and the whole panel
       drags up into a tall sheet for the full day-by-day list. Nothing is
       ever fully hidden, and nothing is ever a rigid, space-wasting split. */
    /* #explorerOverlay stays position:fixed (its base rule, further up this
       file) — a fixed element already anchors position:absolute children,
       so nothing needs overriding here. (An earlier version of this rule
       mistakenly set position:relative on it, which knocked it out of fixed
       full-screen overlay mode entirely — it fell into the normal page flow
       instead of covering the screen, so the whole itinerary view/map never
       appeared, leaving only whatever page content sat behind it visible.) */

    #explorerOverlay #plannerMap {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        /* A positioned element with z-index:auto does NOT get its own
           stacking context — without an explicit value here, Leaflet's
           internal panes (tile pane is z-index:200+, markers 600+, etc.,
           all meant to stack "within the map") compare directly against
           .explorer-sidebar's z-index:20 in the SAME outer context and
           win, painting map tiles over the sidebar regardless of DOM
           order. This is what actually caused the itinerary sheet to
           never visibly appear. */
        z-index: 1;
    }

    .explorer-sidebar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        min-width: 0;
        height: 82dvh;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
        z-index: 20;
        transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
        /* Resting state = "peeked": only the drag handle + header + budget
           strip (~152px) show over the map; the rest sits just below the
           fold, ready to be dragged into view. */
        transform: translateY(calc(100% - 152px));
    }
    .explorer-sidebar.sheet-expanded {
        transform: translateY(0);
    }
    .explorer-sidebar.collapsed {
        /* Mobile ignores the desktop "collapsed → width:0" trick entirely */
        width: 100%;
        min-width: 0;
    }

    .sidebar-drag-handle {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        min-height: 22px;
        cursor: grab;
        touch-action: none;
    }
    .sdh-bar {
        width: 40px;
        height: 5px;
        border-radius: 99px;
        background: rgba(255,255,255,0.3);
    }

    /* Dims the map while the sheet is expanded, so focus reads as "on the
       list" — and taps through to close it, like a standard sheet scrim. */
    .sheet-scrim {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 15;
        background: rgba(0,0,0,0.35);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .sheet-scrim.visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Redundant with the drag handle now driving peek/expand */
    .sb-toggle,
    .sb-reopen-btn {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   MODE SELECTION SCREEN
═══════════════════════════════════════════════════════════ */

.mode-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 28px;
}

.mode-card {
    position: relative;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    padding: 20px 26px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    text-align: start;
    display: grid;
    grid-template-columns: 68px 1fr auto;
    grid-template-rows: auto auto auto;
    column-gap: 22px;
    row-gap: 3px;
    align-items: center;
}
.mode-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 16px 38px rgba(0,0,0,0.32), 0 0 0 1px rgba(217,201,148,0.25) inset;
}

@media (max-width: 700px) {
    .mode-card {
        grid-template-columns: 54px 1fr;
        grid-template-rows: auto auto auto auto;
        row-gap: 6px;
        padding: 18px 18px;
    }
    .mode-card-icon-badge { grid-column: 1; grid-row: 1; width: 54px; height: 54px; }
    .mode-card-title      { grid-column: 2; grid-row: 1; }
    .mode-card-desc       { grid-column: 2; grid-row: 2; }
    .mode-feature-list    { grid-column: 1 / 3; grid-row: 3; }
    .mode-cta-btn         { grid-column: 1 / 3; grid-row: 4; width: 100%; margin-top: 6px; }
}

/* Shimmer sweep on hover */
.mode-card::before {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,0.14), transparent);
    transform: skewX(-15deg);
    transition: left 0.7s ease;
    pointer-events: none;
}
.mode-card:hover::before { left: 130%; }

.mode-card-featured {
    border-color: rgba(217,201,148,0.4);
    background: linear-gradient(155deg, rgba(217,201,148,0.08), rgba(14,107,87,0.18));
}

.mode-card-glow {
    position: absolute;
    top: -60%;
    right: -8%;
    width: 30%;
    height: 220%;
    background: radial-gradient(circle, rgba(217,201,148,0.22), transparent 70%);
    pointer-events: none;
    animation: modeGlowDrift 6s ease-in-out infinite;
}

@keyframes modeGlowDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-8%, 6%) scale(1.15); }
}

.mode-card-badge-inline {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, var(--gold-2), var(--gold));
    color: var(--on-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(217,201,148,0.4);
    animation: modeBadgePulse 2.2s ease-in-out infinite;
}

@keyframes modeBadgePulse {
    0%, 100% { box-shadow: 0 3px 10px rgba(217,201,148,0.4); }
    50%      { box-shadow: 0 3px 18px rgba(217,201,148,0.75); }
}

.mode-card-icon-badge {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
    z-index: 1;
}
.mode-card:hover .mode-card-icon-badge { transform: scale(1.08) rotate(-3deg); }

.mode-card-icon { font-size: 30px; line-height: 1; }

.mode-card-title {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    color: #EAF6F5;
    margin: 0;
}

.mode-card-desc {
    grid-column: 2;
    grid-row: 2;
    font-size: 12.5px;
    color: #9EB8B6;
    line-height: 1.5;
    margin: 0;
}

.mode-feature-list {
    grid-column: 2;
    grid-row: 3;
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 16px;
}
.mode-feature-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #c4dcdb;
    white-space: nowrap;
}
.mode-feature-list li .fa-check {
    color: var(--gold);
    font-size: 9px;
    flex-shrink: 0;
}

.mode-cta-btn {
    grid-column: 3;
    grid-row: 1 / 4;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    width: auto;
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.22s;
    font-family: inherit;
}
.mode-cta-primary {
    background: linear-gradient(90deg, var(--gold-2), var(--gold));
    color: var(--on-gold);
}
.mode-cta-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(217,201,148,0.5);
}
.mode-cta-primary:active { transform: translateY(0) scale(0.98); }
.mode-cta-outline {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    color: #EAF6F5;
    border: 1px solid rgba(255,255,255,0.18);
}
.mode-cta-outline:hover {
    background: rgba(255,255,255,0.13);
    border-color: var(--gold);
    transform: translateY(-2px);
}
.mode-cta-outline:active { transform: translateY(0) scale(0.98); }

/* ═══════════════════════════════════════════════════════════
   MANUAL MODE — SHARED
═══════════════════════════════════════════════════════════ */

.back-mode-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    transition: color 0.2s;
    font-family: inherit;
}
.back-mode-btn:hover { color: var(--text-light); }

/* Secondary entry into manual planning, shown under the wizard hero */
.wiz-manual-switch {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.wiz-manual-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.wiz-manual-link:hover { color: var(--text-light); }

/* ═══════════════════════════════════════════════════════════
   MANUAL MODE — BUDGET BAR
═══════════════════════════════════════════════════════════ */

.manual-budget-bar {
    background: rgba(0,0,0,0.22);
    border-radius: 12px;
    padding: 13px 18px;
    margin-bottom: 22px;
}
.mbb-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 9px;
    flex-wrap: wrap;
    gap: 6px;
}
.mbb-labels strong { color: var(--text-light); }
.mbb-labels .budget-ok   { color: #00cec9; font-weight: 700; }
.mbb-labels .budget-warn { color: #fdcb6e; font-weight: 700; }
.mbb-labels .budget-over { color: #ff7675; font-weight: 700; }
.mbb-track {
    height: 7px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.mbb-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.mbb-fill.budget-ok   { background: linear-gradient(90deg, #00b894, #00cec9); }
.mbb-fill.budget-warn { background: linear-gradient(90deg, #fdcb6e, #e17055); }
.mbb-fill.budget-over { background: linear-gradient(90deg, #d63031, #ff7675); }

/* ═══════════════════════════════════════════════════════════
   MANUAL MODE — DAY TABS
═══════════════════════════════════════════════════════════ */

.manual-day-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.mdt-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 9px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.mdt-tab:hover {
    border-color: rgba(255,255,255,0.28);
    color: var(--text-light);
}
.mdt-tab.active {
    background: rgba(30,169,159,0.18);
    border-color: #1ea99f;
    color: #1ea99f;
}
.mdt-pip {
    background: #1ea99f;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ═══════════════════════════════════════════════════════════
   MANUAL MODE — SLOTS GRID
═══════════════════════════════════════════════════════════ */

.manual-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.mslot {
    background: rgba(0,0,0,0.18);
    border: 2px dashed rgba(255,255,255,0.13);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
    transition: border-color 0.2s;
}
.mslot.mslot-filled {
    border-style: solid;
    border-color: rgba(30,169,159,0.55);
    background: rgba(30,169,159,0.07);
}

.mslot-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mslot-emoji { font-size: 24px; line-height: 1; }
.mslot-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mslot-meta strong { font-size: 14px; color: var(--text-light); font-weight: 700; }
.mslot-time { font-size: 11px; color: var(--muted); }
.mslot-all-days { font-size: 10px; color: var(--muted); white-space: nowrap; }

.mslot-pick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px;
    border-radius: 8px;
    border: 2px dashed rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: auto;
}
.mslot-pick-btn:hover {
    border-color: #1ea99f;
    color: #1ea99f;
    background: rgba(30,169,159,0.1);
}

.mslot-selected { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mslot-sel-name { font-size: 13.5px; font-weight: 700; color: var(--text-light); line-height: 1.35; }
.mslot-sel-info { font-size: 12px; color: var(--muted); }

.mslot-actions { display: flex; gap: 6px; margin-top: auto; }
.mslot-change-btn {
    flex: 1;
    padding: 6px 10px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.07);
    color: var(--text-light);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.mslot-change-btn:hover { background: rgba(255,255,255,0.14); }
.mslot-clear-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(255,80,80,0.25);
    background: rgba(255,80,80,0.1);
    color: #ff7675;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.mslot-clear-btn:hover { background: rgba(255,80,80,0.22); }

/* ═══════════════════════════════════════════════════════════
   PLACE PICKER OVERLAY
═══════════════════════════════════════════════════════════ */

#manualPickerOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.picker-modal {
    background: linear-gradient(160deg, #253d3b, #1a2e2c);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 20px;
    width: 100%;
    max-width: 740px;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0,0,0,0.65);
}

.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.picker-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}
.picker-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.picker-close:hover { background: rgba(255,80,80,0.25); color: #ff7675; }

.picker-body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}
.picker-empty {
    text-align: center;
    color: var(--muted);
    padding: 48px 20px;
    font-size: 15px;
}

.picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 13px;
}

.picker-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 13px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.picker-card:hover {
    background: rgba(30,169,159,0.14);
    border-color: #1ea99f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30,169,159,0.2);
}

.pc-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.35;
}
.pc-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.pc-rating { font-size: 12px; color: #fdcb6e; font-weight: 700; }
.pc-price  { font-size: 12px; color: #00cec9; font-weight: 700; }
.pc-level  {
    font-size: 11px;
    color: var(--muted);
    background: rgba(255,255,255,0.08);
    padding: 2px 7px;
    border-radius: 4px;
}
.pc-desc {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.45;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pc-select-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: rgba(30,169,159,0.18);
    color: #1ea99f;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: auto;
    font-family: inherit;
}
.picker-card:hover .pc-select-btn {
    background: #1ea99f;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE MAP UX — bottom sheet, safe-area, sticky header,
   and 44px touch targets
   (Clustering for the crowded "all places" map is done via
   Mapbox GL's native cluster source — styled in JS paint
   properties, not CSS. See loadPlacesOnMapbox in the .js file.)
═══════════════════════════════════════════════════════════ */

/* ── Mobile bottom sheet — replaces map popups on small screens ── */
.mbs-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.mbs-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.map-bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.35);
    max-height: min(72dvh, 72svh);
    display: flex;
    flex-direction: column;
    transform: translateY(105%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    /* Keep content clear of the home-indicator / gesture bar on notched phones */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.map-bottom-sheet.open {
    transform: translateY(0);
}

.mbs-drag-area {
    flex-shrink: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px 0 6px;
    cursor: grab;
    touch-action: none;
    box-sizing: border-box;
}
.mbs-handle {
    width: 40px;
    height: 5px;
    border-radius: 99px;
    background: #d8d8d8;
}
.mbs-close-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbs-body {
    overflow-y: auto;
    padding: 0 18px 18px;
    -webkit-overflow-scrolling: touch;
}

/* The injected content (buildPopupHTML / _placePopupHTML) carries inline
   styles sized for a small 200px-wide map popup. Re-fit it to the sheet's
   full width so it doesn't look like a tiny popup floating in empty space. */
.mbs-body > div {
    min-width: 0 !important;
    width: 100% !important;
    padding: 0 !important;
}
.mbs-body h4 {
    font-size: 18px !important;
}
.mbs-body a {
    width: 100%;
}

/* Only ever engage the bottom sheet mechanics on small screens */
@media (min-width: 769px) {
    .map-bottom-sheet, .mbs-backdrop { display: none; }
}

/* ── Explorer overlay: safe-area aware height + sticky header ── */
@media (max-width: 768px) {
    #explorerOverlay {
        top: calc(64px + env(safe-area-inset-top, 0px));
        bottom: auto;
        height: calc(100dvh - 64px - env(safe-area-inset-top, 0px));
        overscroll-behavior: contain;
    }

    /* The itinerary sheet's header sits at the bottom of the screen (over
       the map), not near a notch, so it gets no safe-area-inset-top padding
       — that space belongs to the fixed navbar/map above it. */
    .sb-header {
        position: sticky;
        top: 0;
        z-index: 15;
        background: var(--bg3);
    }

    .sb-strip-wrap {
        position: sticky;
        top: 0;
        z-index: 14;
    }

    .explorer-sidebar {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* ── 44x44 minimum touch targets on mobile ── */
    .sb-toggle {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }
    .sb-reopen-btn {
        width: 44px;
        height: 44px;
    }
    .picker-close {
        width: 44px;
        height: 44px;
    }
    .tl-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 12.5px;
    }
    .mslot-change-btn,
    .mslot-clear-btn {
        min-height: 44px;
        min-width: 44px;
    }
    .pref-chip,
    .city-chip,
    .opt-row-toggle,
    .day-tab, .sb-day-tab, .mdt-tab {
        min-height: 44px;
    }
}

